#include <iostream>
#include <algorithm>

int main() {
    int arr[5] = {5, 3, 1, 4, 2};

    // 对数组进行排序
    std::sort(arr, arr + 5);

    std::cout << "Sorted array: ";
    for (int i = 0; i < 5; ++i) {
        std::cout << arr[i] << " ";
    }
    std::cout << std::endl;

    return 0;
}